package vista;

import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.GridLayout;

import javax.swing.JLabel;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Font;

import javax.swing.ImageIcon;
import javax.swing.SwingConstants;
import javax.swing.JTabbedPane;
import javax.swing.JToolBar;
import javax.swing.JPanel;

import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;

import javax.swing.JTextField;

import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JTextPane;

public class main {

	private JFrame frmUsuario;
	private JTextField textField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					main window = new main();
					window.frmUsuario.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public main() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmUsuario = new JFrame();
		frmUsuario.setFont(new Font("Arial Black", Font.BOLD, 12));
		frmUsuario.setTitle("Usuario");
		
		frmUsuario.setResizable(false);
		frmUsuario.getContentPane().setEnabled(false);
		frmUsuario.setBounds(100, 100, 500, 600);
		frmUsuario.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		
		
		frmUsuario.getContentPane().setLayout(null);
		
		
		
		
		JLabel lblDefaultuser = new JLabel("DEFAULT_USER");
		lblDefaultuser.setBounds(162, 11, 262, 47);
		lblDefaultuser.setHorizontalAlignment(SwingConstants.CENTER);
		lblDefaultuser.setVerticalAlignment(SwingConstants.TOP);
		lblDefaultuser.setFont(new Font("Verdana", Font.BOLD, 28));
		frmUsuario.getContentPane().add(lblDefaultuser);
		
		
		
		JLabel lblAos = new JLabel("0 a\u00F1os");
		lblAos.setBounds(239, 50, 82, 28);
		lblAos.setHorizontalAlignment(SwingConstants.CENTER);
		frmUsuario.getContentPane().add(lblAos);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(43, 111, 400, 400);
		frmUsuario.getContentPane().add(tabbedPane);
		
		JPanel panel = new JPanel();
		tabbedPane.addTab("Buscar series", null, panel, null);
		GridBagLayout gbl_panel = new GridBagLayout();
		gbl_panel.columnWidths = new int[]{0, 0, 0};
		gbl_panel.rowHeights = new int[]{0, 0, 0, 0, 0};
		gbl_panel.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
		gbl_panel.rowWeights = new double[]{0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};
		panel.setLayout(gbl_panel);
		
		JLabel lblBuscarSerie = new JLabel("Buscar serie:");
		GridBagConstraints gbc_lblBuscarSerie = new GridBagConstraints();
		gbc_lblBuscarSerie.insets = new Insets(0, 0, 5, 5);
		gbc_lblBuscarSerie.anchor = GridBagConstraints.EAST;
		gbc_lblBuscarSerie.gridx = 0;
		gbc_lblBuscarSerie.gridy = 0;
		panel.add(lblBuscarSerie, gbc_lblBuscarSerie);
		
		textField = new JTextField();
		GridBagConstraints gbc_textField = new GridBagConstraints();
		gbc_textField.insets = new Insets(0, 0, 5, 0);
		gbc_textField.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField.gridx = 1;
		gbc_textField.gridy = 0;
		panel.add(textField, gbc_textField);
		textField.setColumns(10);
		
		JButton btnBuscar = new JButton("Buscar");
		btnBuscar.setHorizontalAlignment(SwingConstants.LEFT);
		GridBagConstraints gbc_btnBuscar = new GridBagConstraints();
		gbc_btnBuscar.gridwidth = 2;
		gbc_btnBuscar.insets = new Insets(0, 0, 5, 0);
		gbc_btnBuscar.gridx = 0;
		gbc_btnBuscar.gridy = 1;
		panel.add(btnBuscar, gbc_btnBuscar);
		
		JTextPane textPane = new JTextPane();
		textPane.setEditable(false);
		GridBagConstraints gbc_textPane = new GridBagConstraints();
		gbc_textPane.gridwidth = 2;
		gbc_textPane.insets = new Insets(0, 0, 5, 0);
		gbc_textPane.fill = GridBagConstraints.BOTH;
		gbc_textPane.gridx = 0;
		gbc_textPane.gridy = 2;
		panel.add(textPane, gbc_textPane);
		
		JButton btnVerInformacin = new JButton("Ver informaci\u00F3n");
		GridBagConstraints gbc_btnVerInformacin = new GridBagConstraints();
		gbc_btnVerInformacin.gridwidth = 2;
		gbc_btnVerInformacin.gridx = 0;
		gbc_btnVerInformacin.gridy = 3;
		panel.add(btnVerInformacin, gbc_btnVerInformacin);
		
		JPanel panel_1 = new JPanel();
		tabbedPane.addTab("Mis series", null, panel_1, null);
		
		JLabel imagen = new JLabel("Imagen");
		ImageIcon icon = new ImageIcon("img/mario.png"); 
		imagen.setBounds(43, 29, 75, 71);
		imagen.setIcon(new ImageIcon(main.class.getResource("/img/mario.png")));
		frmUsuario.getContentPane().add(imagen);
	}
}
